<template>
  <div class="platform-gold-coin-manage">
    <el-card>
      <el-table
        v-loading="isLoading"
        :data="tableData"
        border
        style="width: 100%"
      >
        <el-table-column
          fixed
          width="100"
          prop="user_id"
          label="用户ID"
          align="center"
        />
        <el-table-column
          prop="suggestion"
          label="反馈信息"
          align="center"
        />
        <el-table-column
          width="180"
          prop="feedback_time"
          label="反馈时间"
          align="center"
        />
      </el-table>

      <el-pagination
        :page-size="10"
        layout="total, prev, pager, next, jumper"
        :total="total"
        @current-change="handleCurrentChange"
      />
    </el-card>
  </div>
</template>
<script>
import { feedbackSearch } from '@/api/user'
export default {
  name: 'PlatformGoldCoinManage',
  data() {
    return {
      ruleForm: {
        pageNumber: 1
      },
      tableData: [],
      isLoading: false,
      total: 0
    }
  },
  mounted() {
    this.feedbackSearch()
  },
  methods: {
    feedbackSearch() {
      this.isLoading = true
      feedbackSearch(this.ruleForm).then(res => {
        this.tableData = res.list
        this.total = res.totalRow
        this.isLoading = false
      }).catch(() => {
        this.isLoading = false
      })
    },
    handleCurrentChange(page) {
      this.ruleForm.pageNumber = page
      this.feedbackSearch()
    }
  }
}
</script>
<style lang="scss">
  .platform-gold-coin-manage{
    .el-card{
      .ruleForm{
        .el-input{
          width: 200px;
        }
        .el-select{
          width: 200px;
        }
      }
    }
  }
</style>
